package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.TravelContent;
import cn.wolfcode.trip.base.mapper.TravelContentMapper;
import cn.wolfcode.trip.base.service.ITravelContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TravelContentServiceImpl implements ITravelContentService{
    @Autowired
    private TravelContentMapper travelContentMapper;


    @Override
    public void saveOrUpdate(TravelContent content) {
        if (content.getId() == null) {
            travelContentMapper.insert(content);
        }else{
            travelContentMapper.updateByPrimaryKey(content);
        }
    }
}
